package main

import (
	"os"
	"text/template"
)

func main() {
	tEmpty := template.New("templ test")
	tEmpty = template.Must(tEmpty.Parse("Empty pipeline if demo: {{if ``}} wil not print. {{end}}\n"))
	tEmpty.Execute(os.Stdout, nil)

	tWithVal := template.New("templ test")
	tWithVal = template.Must(tWithVal.Parse("Non empty pipeline if demo: {{if `anything`}} will print {{end}}\n"))
	tWithVal.Execute(os.Stdout, nil)

	tIfElse := template.New("templ test")
	tIfElse = template.Must(tIfElse.Parse("if-else demo: {{if `anything`}} will print IF part {else} will print else part {{end}}\n"))
	tIfElse.Execute(os.Stdout, tIfElse)

}
